package com.example.demo.Mapper;

import com.example.demo.Pojo.CartDTO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AddMapper {

    @Insert("insert shixun.cart(name, price, number, url) value (#{name},#{price},#{number},#{url})")
    void add(String name,Float price,int number,String url);

    @Select("select * from shixun.cart where name = #{name}")
    CartDTO exam(String name);
}
